<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateColumnAssetsTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('column_assets', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('muticolumn_id')->default(0)->nullable()->unsigned()->comment('栏目ID');
            $table->integer('asset_type')->default(0)->unsigned()->comment('媒资类型');
            $table->integer('asset_id')->default(0)->nullable()->unsigned()->comment('数据ID');
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('column_assets');
    }
}
